package xiao_jin.fantastic_journey.generator;

import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricModelProvider;
import net.minecraft.data.client.BlockStateModelGenerator;
import net.minecraft.data.client.ItemModelGenerator;
import net.minecraft.data.client.Models;
import xiao_jin.fantastic_journey.client.model.ModModels;
import xiao_jin.fantastic_journey.core.init.ModBlocks;
import xiao_jin.fantastic_journey.core.init.ModFluids;
import xiao_jin.fantastic_journey.core.init.ModItems;

public final class ModModelsProvider extends FabricModelProvider {
    public ModModelsProvider(FabricDataOutput output) {
        super(output);
    }

    @Override
    public void generateBlockStateModels(BlockStateModelGenerator blockStateModelGenerator) {
        BlockStateModelGenerator.BlockTexturePool ruinsStone = blockStateModelGenerator.registerCubeAllModelTexturePool(ModBlocks.RELICTECH_STONE);
        BlockStateModelGenerator.BlockTexturePool ruinsStoneBricks = blockStateModelGenerator.registerCubeAllModelTexturePool(ModBlocks.RELICTECH_STONE_BRICKS);
        BlockStateModelGenerator.BlockTexturePool ruinsCrackStone = blockStateModelGenerator.registerCubeAllModelTexturePool(ModBlocks.RELICTECH_CRACK_STONE);
        BlockStateModelGenerator.BlockTexturePool ruinsCrackStoneBricks = blockStateModelGenerator.registerCubeAllModelTexturePool(ModBlocks.RELICTECH_CRACK_STONE_BRICKS);
        BlockStateModelGenerator.BlockTexturePool deepRuinsStone = blockStateModelGenerator.registerCubeAllModelTexturePool(ModBlocks.DEEP_RELICTECH_STONE);


        ruinsStone.slab(ModBlocks.RELICTECH_STONE_SLAB);
        ruinsStone.stairs(ModBlocks.RELICTECH_STONE_STAIRS);
        ruinsStone.wall(ModBlocks.RELICTECH_STONE_WALL);
        ruinsStoneBricks.slab(ModBlocks.RELICTECH_STONE_BRICKS_SLAB);
        ruinsStoneBricks.stairs(ModBlocks.RELICTECH_STONE_BRICKS_STAIRS);
        ruinsStoneBricks.wall(ModBlocks.RELICTECH_STONE_BRICKS_WALL);
        ruinsCrackStone.slab(ModBlocks.RELICTECH_CRACK_STONE_SLAB);
        ruinsCrackStone.stairs(ModBlocks.RELICTECH_CRACK_STONE_STAIRS);
        ruinsCrackStone.wall(ModBlocks.RELICTECH_CRACK_STONE_WALL);
        ruinsCrackStoneBricks.slab(ModBlocks.RELICTECH_CRACK_STONE_BRICKS_SLAB);
        ruinsCrackStoneBricks.stairs(ModBlocks.RELICTECH_CRACK_STONE_BRICKS_STAIRS);
        ruinsCrackStoneBricks.wall(ModBlocks.RELICTECH_CRACK_STONE_BRICKS_WALL);
        deepRuinsStone.slab(ModBlocks.DEEP_RELICTECH_STONE_SLAB);
        deepRuinsStone.stairs(ModBlocks.DEEP_RELICTECH_STONE_STAIRS);
        deepRuinsStone.wall(ModBlocks.DEEP_RELICTECH_STONE_WALL);

        blockStateModelGenerator.registerRotatable(ModBlocks.WASTE_SOIL);
        blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.EXPLOSIVE_STEEL_BLOCK);
        blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.DEEP_RELICTECH_COPPER_ORE);
        blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.DEEP_RELICTECH_EMERALD_ORE);
        blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.DEEP_RELICTECH_REDSTONE_ORE);
        blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.DEEP_RELICTECH_DIAMOND_ORE);
        blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.DEEP_RELICTECH_LAPIS_ORE);
        blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.DEEP_RELICTECH_GOLD_ORE);
        blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.DEEP_RELICTECH_IRON_ORE);
        blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.RELICTECH_COPPER_ORE);
        blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.RELICTECH_EMERALD_ORE);
        blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.RELICTECH_REDSTONE_ORE);
        blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.RELICTECH_DIAMOND_ORE);
        blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.RELICTECH_LAPIS_ORE);
        blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.RELICTECH_GOLD_ORE);
        blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.RELICTECH_IRON_ORE);
    }

    @Override
    public void generateItemModels(ItemModelGenerator itemModelGenerator) {
        itemModelGenerator.register(ModItems.GEL, Models.GENERATED);
        itemModelGenerator.register(ModFluids.BARREL_MECHROIL, Models.GENERATED);
        itemModelGenerator.register(ModItems.CRYSTAL_FRAGMENTS, Models.GENERATED);
        itemModelGenerator.register(ModItems.EMERALD_GRANULES, Models.GENERATED);
        itemModelGenerator.register(ModItems.GEL_BLUE, Models.GENERATED);
        itemModelGenerator.register(ModItems.IMBECILE_SOUL_STONE, Models.GENERATED);
        itemModelGenerator.register(ModItems.ESSENTIAL_LIFE, Models.GENERATED);
        itemModelGenerator.register(ModItems.ESSENTIAL_HOLY, Models.GENERATED);
        itemModelGenerator.register(ModItems.ESSENTIAL_HELL, Models.GENERATED);
        itemModelGenerator.register(ModItems.ESSENTIAL_SPEED, Models.GENERATED);
        itemModelGenerator.register(ModItems.ESSENTIAL_UMBRA, Models.GENERATED);
        itemModelGenerator.register(ModItems.ESSENTIAL_EVIL, Models.GENERATED);
        itemModelGenerator.register(ModItems.ESSENTIAL_END, Models.GENERATED);
        itemModelGenerator.register(ModItems.ESSENTIAL_SOUL, Models.GENERATED);
        itemModelGenerator.register(ModItems.SANDPAPER, Models.GENERATED);
        itemModelGenerator.register(ModItems.SOUL_FRAGMENTS, Models.GENERATED);
        itemModelGenerator.register(ModItems.EXPLOSIVE_STEEL_INGOT, Models.GENERATED);
        itemModelGenerator.register(ModItems.EXPLOSIVE_STEEL_PARTICLE, Models.GENERATED);
        itemModelGenerator.register(ModItems.EXPLOSIVE_STEEL_PIECE, Models.GENERATED);
        itemModelGenerator.register(ModItems.DIAMOND, Models.GENERATED);
        itemModelGenerator.register(ModItems.WAND_APPRENTICE, Models.HANDHELD);
        itemModelGenerator.register(ModItems.WAND_WOODEN, Models.HANDHELD);
        itemModelGenerator.register(ModItems.ACTIVATE_STICK, Models.HANDHELD);
        itemModelGenerator.register(ModItems.BREEZE_INGOT, Models.HANDHELD);
        itemModelGenerator.register(ModItems.WIND_CORE, Models.GENERATED);
        itemModelGenerator.register(ModItems.DAGGER_WOOD, Models.GENERATED);
        itemModelGenerator.register(ModItems.DAGGER_STONE, Models.GENERATED);
        itemModelGenerator.register(ModItems.DAGGER_IRON, Models.GENERATED);
        itemModelGenerator.register(ModItems.DAGGER_GOLD, Models.GENERATED);
        itemModelGenerator.register(ModItems.DAGGER_DIAMOND, Models.GENERATED);
        itemModelGenerator.register(ModItems.DAGGER_EMERALD, Models.GENERATED);
        itemModelGenerator.register(ModItems.DAGGER_NETHERITE, Models.GENERATED);
        itemModelGenerator.register(ModItems.LONGSWORD_WOOD, ModModels.LONGSWORD);
        itemModelGenerator.register(ModItems.LONGSWORD_STONE, ModModels.LONGSWORD);
        itemModelGenerator.register(ModItems.LONGSWORD_IRON, ModModels.LONGSWORD);
        itemModelGenerator.register(ModItems.LONGSWORD_GOLD, ModModels.LONGSWORD);
        itemModelGenerator.register(ModItems.LONGSWORD_DIAMOND, ModModels.LONGSWORD);
        itemModelGenerator.register(ModItems.LONGSWORD_EMERALD, ModModels.LONGSWORD);
        itemModelGenerator.register(ModItems.LONGSWORD_NETHERITE, ModModels.LONGSWORD);
        itemModelGenerator.register(ModItems.LEGACYBUTTON, Models.GENERATED);
        itemModelGenerator.register(ModItems.COLLAR, Models.GENERATED);
        itemModelGenerator.register(ModItems.BROADSWORD_WOOD, ModModels.BROADSWORD);
        itemModelGenerator.register(ModItems.BROADSWORD_STONE, ModModels.BROADSWORD);
        itemModelGenerator.register(ModItems.BROADSWORD_IRON, ModModels.BROADSWORD);
        itemModelGenerator.register(ModItems.BROADSWORD_GOLD, ModModels.BROADSWORD);
        itemModelGenerator.register(ModItems.BROADSWORD_DIAMOND, ModModels.BROADSWORD);
        itemModelGenerator.register(ModItems.BROADSWORD_EMERALD, ModModels.BROADSWORD);
        itemModelGenerator.register(ModItems.BROADSWORD_NETHERITE, ModModels.BROADSWORD);
        itemModelGenerator.register(ModItems.RAPIER_WOOD, ModModels.RAPIER);
        itemModelGenerator.register(ModItems.RAPIER_STONE, ModModels.RAPIER);
        itemModelGenerator.register(ModItems.RAPIER_IRON, ModModels.RAPIER);
        itemModelGenerator.register(ModItems.RAPIER_GOLD, ModModels.RAPIER);
        itemModelGenerator.register(ModItems.RAPIER_DIAMOND, ModModels.RAPIER);
        itemModelGenerator.register(ModItems.RAPIER_EMERALD, ModModels.RAPIER);
        itemModelGenerator.register(ModItems.RAPIER_NETHERITE, ModModels.RAPIER);
        itemModelGenerator.register(ModItems.ANCIENT_CHOCOLATE, Models.GENERATED);
        itemModelGenerator.register(ModItems.NSCULK_CHOCOLATE, Models.GENERATED);
        itemModelGenerator.register(ModItems.WARDEN_HEART, Models.GENERATED);
        itemModelGenerator.register(ModItems.ANCIENT_RECIPES, Models.GENERATED);

    }
}
